Ext.onReady(function(){
	Ext.QuickTips.init();
    sweatShop.viewPort = new sweatshopViewportUi({
		renderTo: Ext.getBody()
        , autoScroll : true
    	,items:[
            new northPanel({
                id: 'northPanel'
                ,ref: 'northPanel'
            }),{
                xtype : 'backlog'
                ,id: 'backlogPanel'
                ,region: 'west'
				,width: 250
                ,collapsible : true
                ,collapsed : true
			},{
                xtype : 'scrumboard'
                ,region: 'center'
                ,id : 'scrumboardPanel'
            },{
                xtype : 'donelog'
                ,id: 'donelogPanel'
                ,region: 'east'
                ,width: 250
                ,collapsible : true
                ,collapsed : true
            }
            ,logPanel = new logViewer({
                id: 'sweatshopLogPanel'
                ,collapsed: true
            })
		]
	});
    sweatShop.logContainer = logPanel;
	sweatShop.viewPort.show();
    sweatShop.session.checkSession();

    Ext.get('prograss-ready-indicator').removeClass('hidden');
    sweatShop.log('System initialized', 0);
});

var keyCommands = [
    {key:'x', ctrl:true, shift:false, fn: sweatShop.openTicketWizard }
];
new Ext.KeyMap(Ext.get(document), keyCommands);

